# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=beancount-language-server
pkgver=1.3.4
pkgrel=0
pkgdesc="Language server for Beancount files"
url="https://github.com/polarmutex/beancount-language-server"
license="MIT"
arch="all !armhf" # FTBFS
makedepends="cargo cargo-auditable"
source="https://github.com/polarmutex/beancount-language-server/archive/v$pkgver/beancount-language-server-$pkgver.tar.gz"
options="!check net" # no test suite, fetch dependencies

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -Dm755 target/release/$pkgname -t "$pkgdir"/usr/bin/
}

sha512sums="
48f06ccca47a4819a9a3214206ae3a517ee74174b13f4b6d7783fe7a89c8430494e9f19869f2ead49000a87c533c6495f3e11af1def8a7155b4a8ca32ef1eae7  beancount-language-server-1.3.4.tar.gz
"
